package org.jeecg.modules.demo.patent.entity;

import java.io.Serializable;
import java.io.UnsupportedEncodingException;
import java.util.Date;
import java.math.BigDecimal;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.TableLogic;
import org.jeecg.common.constant.ProvinceCityArea;
import org.jeecg.common.util.SpringContextUtils;
import lombok.Data;
import com.fasterxml.jackson.annotation.JsonFormat;
import org.springframework.format.annotation.DateTimeFormat;
import org.jeecgframework.poi.excel.annotation.Excel;
import org.jeecg.common.aspect.annotation.Dict;
import io.swagger.v3.oas.annotations.media.Schema;
import lombok.EqualsAndHashCode;
import lombok.experimental.Accessors;

/**
 * @Description: 专利表
 * @Author: jeecg-boot
 * @Date:   2025-06-05
 * @Version: V1.0
 */
@Data
@TableName("t_patent")
@Accessors(chain = true)
@EqualsAndHashCode(callSuper = false)
@Schema(description="专利表")
public class Patent implements Serializable {
    private static final long serialVersionUID = 1L;

	/**主键*/
	@TableId(type = IdType.ASSIGN_ID)
    @Schema(description = "主键")
    private java.lang.String id;
	/**创建人*/
    @Schema(description = "创建人")
    private java.lang.String createBy;
	/**创建日期*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @Schema(description = "创建日期")
    private java.util.Date createTime;
	/**更新人*/
    @Schema(description = "更新人")
    private java.lang.String updateBy;
	/**更新日期*/
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd HH:mm:ss")
    @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss")
    @Schema(description = "更新日期")
    private java.util.Date updateTime;
	/**所属部门*/
    @Schema(description = "所属部门")
    private java.lang.String sysOrgCode;
	/**发明名称(源文)*/
	@Excel(name = "发明名称(源文)", width = 15)
    @Schema(description = "发明名称(源文)")
    private java.lang.String originName;
	/**发明名称(中文)*/
	@Excel(name = "发明名称(中文)", width = 15)
    @Schema(description = "发明名称(中文)")
    private java.lang.String zhName;
	/**申请号*/
	@Excel(name = "申请号", width = 15)
    @Schema(description = "申请号")
    private java.lang.String applyId;
	/**申请日*/
	@Excel(name = "申请日", width = 15, format = "yyyy-MM-dd")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @Schema(description = "申请日")
    private java.util.Date applyDate;
	/**申请日(全过程文本)*/
	@Excel(name = "申请日(全过程文本)", width = 15)
    @Schema(description = "申请日(全过程文本)")
    private java.lang.String applyDateAll;
	/**申请公布号*/
	@Excel(name = "申请公布号", width = 15)
    @Schema(description = "申请公布号")
    private java.lang.String applyPublicId;
	/**申请公布日*/
	@Excel(name = "申请公布日", width = 15, format = "yyyy-MM-dd")
	@JsonFormat(timezone = "GMT+8",pattern = "yyyy-MM-dd")
    @DateTimeFormat(pattern="yyyy-MM-dd")
    @Schema(description = "申请公布日")
    private java.util.Date applyPublicDate;
	/**申请公布日(全过程文本)*/
	@Excel(name = "申请公布日(全过程文本)", width = 15)
    @Schema(description = "申请公布日(全过程文本)")
    private java.lang.String applyPublicDateAll;
	/**申请机构名称（源文）*/
	@Excel(name = "申请机构名称（源文）", width = 15)
    @Schema(description = "申请机构名称（源文）")
    private java.lang.String applyInstitutionOriginName;
	/**申请机构名称（中文）*/
	@Excel(name = "申请机构名称（中文）", width = 15)
    @Schema(description = "申请机构名称（中文）")
    private java.lang.String applyInstitutionZhName;
	/**发明人名称（源文）*/
	@Excel(name = "发明人名称（源文）", width = 15)
    @Schema(description = "发明人名称（源文）")
    private java.lang.String inventorOriginName;
	/**发明人名称（中文）*/
	@Excel(name = "发明人名称（中文）", width = 15)
    @Schema(description = "发明人名称（中文）")
    private java.lang.String inventorZhName;
	/**地址(字符串原文）*/
	@Excel(name = "地址(字符串原文）", width = 15)
    @Schema(description = "地址(字符串原文）")
    private java.lang.String address;
	/**代理机构名称（源文）*/
	@Excel(name = "代理机构名称（源文）", width = 15)
    @Schema(description = "代理机构名称（源文）")
    private java.lang.String agentInstitutionOriginName;
	/**代理机构名称（中文）*/
	@Excel(name = "代理机构名称（中文）", width = 15)
    @Schema(description = "代理机构名称（中文）")
    private java.lang.String agentInstitutionZhName;
	/**代理人（源文）*/
	@Excel(name = "代理人（源文）", width = 15)
    @Schema(description = "代理人（源文）")
    private java.lang.String agentOriginName;
	/**代理人（中文）*/
	@Excel(name = "代理人（中文）", width = 15)
    @Schema(description = "代理人（中文）")
    private java.lang.String agentZhName;
	/**IPC分类号*/
	@Excel(name = "IPC分类号", width = 15)
    @Schema(description = "IPC分类号")
    private java.lang.String ipcClassId;
	/**国际分类号*/
	@Excel(name = "国际分类号", width = 15)
    @Schema(description = "国际分类号")
    private java.lang.String internetClassId;
	/**摘要（源文）*/
	@Excel(name = "摘要（源文）", width = 15)
    @Schema(description = "摘要（源文）")
    private java.lang.String summary;
	/**摘要（中文）*/
	@Excel(name = "摘要（中文）", width = 15)
    @Schema(description = "摘要（中文）")
    private java.lang.String summaryZh;
	/**文件*/
	@Excel(name = "文件", width = 15)
    private transient java.lang.String fileString;

    private byte[] file;

	/**是否美国政府资助专利*/
	@Excel(name = "是否美国政府资助专利", width = 15)
    @Schema(description = "是否美国政府资助专利(0-否,1-是)")
    private java.lang.Integer isUsGovFunded;

	/**美国政府资助信息*/
	@Excel(name = "美国政府资助信息", width = 15)
    @Schema(description = "美国政府资助信息")
    private java.lang.String usGovFundingInfo;

	/**AI是否已处理*/
	@Excel(name = "AI是否已处理", width = 15)
    @Schema(description = "AI是否已处理(0-未处理,1-已处理)")
    private java.lang.Integer aiProcessed;

    public byte[] getFile(){
        if(fileString==null){
            return null;
        }
        try {
            return fileString.getBytes("UTF-8");
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
        }
        return null;
    }

    public String getFileString(){
        if(file==null || file.length==0){
            return "";
        }
        try {
            return new String(file,"UTF-8");
        } catch (UnsupportedEncodingException e) {
            e.printStackTrace();
        }
        return "";
    }
}
